60b4eae5d8fc3b73de3bc5c9a241a0a689568719,yggdrasil-backend/src/main/java/yushijinhun/authlibagent/web/manager/ProfileResourceImpl.java,ProfileResourceImpl,deleteProfile,#UUID#,128

Before Change


	@Transactional
	@Override
	public void deleteProfile(UUID uuid) {
		sessionFactory.getCurrentSession().delete(lookupProfile(uuid));
	}

	@Transactional

After Change


	public void deleteProfile(UUID uuid) {
		Session session = sessionFactory.getCurrentSession();

		GameProfile profile = lookupProfile(uuid);
		Account account = profile.getOwner();
		account.getProfiles().remove(profile);
		// expire the account cache
		session.update(account);
		session.delete(profile);
	}

	@Transactional